Thesis for the Degree of Licentiate of Philosophy Induction Rules for Proving Correctness of Imperative Programs
نویسنده
چکیده
This thesis is aimed at simplifying the user-interaction in semi-interactive theorem proving for imperative programs. More specifically, we describe the creation of customised induction rules that are tailor-made for the specific program to verify and thus make the resulting proof simpler. The concern is in user interaction, rather than in proof strength. To achieve this, two different verification techniques are used. In the first approach, we develop an idea where a software testing technique, partition analysis, is used to compute a partition of the domain of the induction variable, based on the branch predicates in the program we wish to prove correct. Based on this partition we derive mechanically a partitioned induction rule, which then inherits the divide-and-conquer style of partition analysis, and (hopefully) is easier to use than the standard (Peano) induction rule. The second part of the thesis continues with a more thorough development of the method. Here the connection to software testing is completely removed and the focus is on inductive theorem proving only. This time, we make use of failed proof attempts in a theorem prover to gain information about the problem structure and create the partition. Then, based on the partition we create an induction rule, in destructor style, that is customised to make the proving of the loop simpler. With the customised induction rules, in comparison to standard (Peano) induction or Noetherian induction, the required user interaction is moved to an earlier point in the proof which also becomes more modularised. Moreover, by using destructor style induction we circumvent the problem of creating inverses of functions. The soundness of the customised induction rules created by the method is shown. Furthermore, the machinery of the theorem prover (KeY) is used to make the method automatic. The induction rules are developed to prove the total correctness of loops in an object-oriented language and we concentrate on integers.
منابع مشابه
Verification of parallel programs with the Owicki-Gries and Rely-Guarantee methods in Isabelle, HOL
This thesis presents the first formalization of the Owicki-Gries method and its compositional version, the rely-guarantee method, in a theorem prover. These methods are widely used for correctness proofs of parallel imperative programs with shared variables. We define syntax, semantics and proof rules in Isabelle/HOL, which is the instantiation of higher-order logic in the theorem prover Isabel...
متن کاملFormal Specification and Prototyping of a Program Specializer
This paper reports on the use of formal specifications in the development of a software maintenance tool for specializing imperative programs, which have become very complex due to extensive modifications. The tool is specified in terms of inference rules and operates by induction on the abstract syntax. The correctness of these rules is proved using rule induction. A Prolog prototype has been ...
متن کاملProgram Variables – The Core of Mechanical Reasoning about Imperative Programs
Imperative programming languages are widely used in practice in most of the software development projects. Examples of such languages include C, C++, C#, Java, Pascal, and many more. This thesis is concerned with reasoning about imperative programs. We study both refinement (the construction of correct programs starting from specifications) and correctness (an already written program is proved ...
متن کاملAutomated Invariant Generation by Algebraic Techniques for Imperative Program Verification in Theorema Automated Invariant Generation by Algebraic Techniques for Imperative Program Verification in Theorema
This thesis presents algebraic and combinatorial approaches for reasoning about imperative loops with assignments, sequencing and conditionals. A certain family of loops, called P-solvable, is defined for which the value of each program variable can be expressed as a polynomial of the initial values of variables, the loop counter, and some new variables where there are algebraic dependencies am...
متن کاملFormal Specification and Prototyping of a Program Specializer
Abstract . This paper reports on the use of formal specifications in the development of a software maintenance tool for specializing imperative programs, which have become very complex due to extensive modifications. The tool is specified in terms of inference rules and operates by induction on the abstract syntax. The correctness of these rules is proved using rule induction. A Prolog prototyp...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2004